/**
 * @FileName Client.java
 * @Package com.designMode.abstractFactory
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-5 下午3:20:40
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.abstractFactory;

/**
 * @author 顾博君
 * @ClassName Client
 * @Date 2016-1-5 下午3:20:40
 * @Function 场景类
 */

public class Client {
    public static void main(String[] args) {
        // 定义两个工厂
        AbstractCreator creator1 = new Creator1();
        AbstractCreator creator2 = new Creator2();
        //工厂生产产品
        AbstractProductA a1 = creator1.createProductA();
        AbstractProductA a2 = creator2.createProductA();
        AbstractProductB b1 = creator1.createProductB();
        AbstractProductB b2 = creator2.createProductB();
        a1.doSomething();
        a2.doSomething();
        b1.doSomething();
        b2.doSomething();

        b1.shareMethod();
    }
}
